<?php
if (!defined('W_ROOT')) {
	exit();
}

	require_once('../../libraryfiles/dbconfig.php');
		$sql = "SELECT * FROM tbluser WHERE id='".@$_SESSION['acc_id']."'";
		$qury = mysql_query($sql);
	if(@mysql_num_rows($qury) > 0){
		while($info = mysql_fetch_object( $qury )){
			$FirstName = $info->first_name; 
			$LastName  = $info->last_name;
			$Email	   = $info->email;
			$Phone	   = $info->phone;
			$Address   = $info->address;
			$UserName  = $info->username;
		}
	}
?>
<div class="breadcrumb">
        <a href="<?php echo base_url_admin;?>"><?php echo $lang['HOME'];?></a>
         :: <a href="index.php?view=list"><?php echo $lang['LIST_USER'];?></a>
         :: <a href="#">User Profile</a>
      </div>
<div class="heading">
	<h1><img src="../templates/image/user.png" alt="" />Profile &nbsp;&nbsp;&nbsp;<span class="required">(*) all asterisks must be required!</span></h1>
	
	<form action="<?php echo base_url_admin?>/user/process.php?action=changepassword" method="post" name="frmlist">
	<div class="buttons">
	<input class="button" type="submit" name="btnsavePassword" value="<?php echo $lang['SAVE'] ;?>"/>
	<a href="<?php echo base_url_admin?>/user/index.php?view=userprofile" class="button"><?php echo $lang['BACK'];?></a></div>
</div>
<div class="content">
	<?php if(isset($_GET['message']) && @$_GET['message']=='errorpas'){?>
	<div class="warning"><?php echo ($_GET['message']=='errorpas')?"Your old password is incorrect!":"";?></div>
	<?php }?>
	<?php if(isset($_GET['message']) && $_GET['message']=='compass'){?>
	<div class="warning"><?php echo ($_GET['message']=='compass')?"New password and Comirm password are not matched!":"";?></div>
	<?php }?>
	<?php if(isset($_GET['message']) && $_GET['message']=='required'){?>
	<div class="warning"><?php echo ($_GET['message']=='required')?"Field is required!":"";?></div>
	<?php }?>
<form action="process.php?action=changepassword" method="post" name="frmlist">
<table cellpadding="5" cellspacing="5" border="0" width="100%" align="center">

<tr> 
   <td width="10%" height="30" align="left" valign="top">Old Password <span class="required">*</span></td>
   <td width="5%" align="left" valign="top">:</td>
   <td width="80%" align="left">
        <input size="50" name="txtOldPassword" type="password"  id="txtOldPassword"  value=""  />
        
   </td>
</tr>
<tr> 
   <td width="10%" height="30" align="left" valign="top"><!--Password-->New <?php echo $lang['LOG_PASSWORD'];?> <span class="required">*</span></td>
   <td width="5%" align="left" valign="top">:</td>
   <td width="80%" align="left">
        <input size="50" name="txtpass" type="password"  id="txtpass" value="" />
   </td>
</tr>
<tr> 
   <td width="10%" height="30" align="left" valign="top">
   <!--Confirm Password--><?php echo $lang['CONFIRMPASSWORDS'];?> <span class="required">*</span></td>
   <td width="5%" align="left" valign="top">:</td>
   <td width="80%" align="left">
        <input size="50" name="txtconpass" type="password"  id="txtconpass" value=""/>
        <input type="hidden" name="hidid" value="" />
   </td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
</form>
</div>
</div><!--<div class="row">-->